/*
 * Created on Jan 31, 2008
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package it.unibo.deis.lia.mmhc.util;

import java.io.*;

public class Path implements Serializable {

	private static final long serialVersionUID = 1L;

	private Channel channel;
	private int hops;
	private float throughputKBs;
	private int clients;
	private float pathMobility;

	public Path(Channel channel, int hops, float throughputKBs, int clients,
			float pathMobility) {
		this.channel = channel;
		this.hops = hops;
		this.throughputKBs = throughputKBs;
		this.clients = clients;
		this.pathMobility = pathMobility;
	}

	/*
	 * public Path(Channel channel,int hops,float throughputKBs,float
	 * pathMobility){ this.channel=channel; this.hops=hops;
	 * this.throughputKBs=throughputKBs; this.pathMobility=pathMobility; }
	 */
	public Channel getChannel() {
		return channel;
	}

	public int getClients() {
		return clients;
	}

	public int getHops() {
		return hops;
	}

	public float getThroughputKBs() {
		return throughputKBs;
	}

	public float getPathMobility() {
		return pathMobility;
	}

	public String toString() {
		return "hops=" + hops + " throughputKBs=" + throughputKBs + " clients="
				+ clients + " pathMobility=" + pathMobility + " @ { " + channel
				+ " }";
	}

	@Override
	public boolean equals(Object obj) {
		Path path = (Path) obj;
		return path.channel.getChannelLocalIPAddress().equals(
				channel.getChannelLocalIPAddress());
	}
}
